<template>
  <div class="block-box">
    <div class="corner-lb"></div>
    <div class="corner-rb"></div>
    <h3 class="task-title">
      设备总览<img class="icon" :src="getImageUrl('leftbg10.png')" alt="" />
    </h3>
    <div class="task-num">
      <div class="task-list">
        <div>
          <img class="task-icon" src="../../../../../assets/rightbg1.png" alt="" />
        </div>
        <div class="task-con">
          <p><span style="color: #00faff">{{ equipmentList.airportOnlineNum }}</span>/{{ equipmentList.airportNum }}</p>
          <p class="task-con-tit">机场设备</p>
        </div>
      </div>
      <div class="task-list">
        <div>
          <img class="task-icon" src="../../../../../assets/rightbg2.png" alt="" />
        </div>
        <div class="task-con">
          <p><span style="color: #eebf1b">{{ equipmentList.droneOnlineNum }}</span>/{{ equipmentList.droneNum }}</p>
          <p class="task-con-tit">无人机设备</p>
        </div>
      </div>
      <div class="task-list">
        <div>
          <img class="task-icon" src="../../../../../assets/rightbg3.png" alt="" />
        </div>
        <div class="task-con">
          <p><span style="color: #00faff">{{ equipmentList.otherNum }}</span></p>
          <p class="task-con-tit">其他设备</p>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { dividerProps } from "element-plus";
import { ref, onMounted, onBeforeUnmount, defineProps } from "vue";
const props = defineProps({ equipmentList: Object });
const getImageUrl = (name: string) => {
  return new URL(`../../../../../assets/${name}`, import.meta.url).href;
};
</script>


<style lang="scss" scoped>
.block-box {
  height: 18vh;
  background: rgb(2 19 20 / 52%);
  border: 1px solid;
  border-image: radial-gradient(circle,
      rgb(36 229 241 / 17%),
      rgb(255 255 255 / 17%)) 1 1;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0px;
    width: 22px;
    height: 22px;
    border-top: 1px solid #24e5f1;
    opacity: 0.4;
  }

  &::after {
    content: "";
    position: absolute;
    top: -1px;
    right: -1px;
    width: 22px;
    height: 22px;
    border-top: 1px solid #24e5f1;
    opacity: 0.4;
  }

  .corner-lb {
    content: "";
    position: absolute;
    bottom: -1px;
    left: -1px;
    width: 22px;
    height: 22px;
    border-bottom: 1px solid #24e5f1;
    border-left: 1px solid #24e5f1;
    opacity: 0.4;
  }

  .corner-rb {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 22px;
    height: 22px;
    border-bottom: 1px solid #24e5f1;
    border-right: 1px solid #24e5f1;
    opacity: 0.4;
  }

  .task-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4vh;
    padding-left: 1.5vh;
    margin: 0;
    font-family: PingFangSC, "PingFang SC";
    font-size: 2vh;
    font-weight: 500;
    color: #fffefe;
    user-select: none;
    background: radial-gradient(ellipse 140% 300% at 100% 50%,
        rgba(1, 34, 35, 0.2) 28%,
        rgba(7, 217, 221, 0.7) 100%);

    .icon {
      width: 3vh;
      margin-right: 1vw;
    }
  }

  .task-num {
    height: 14vh;
    display: flex;
    align-items: center;
    justify-content: space-around;

    /* 允许换行 */
    .task-icon {
      // margin-left: 0.5rem;
      width: 7vh;
      height: 7vh;
    }

    .task-list {
      // padding: 15px 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 33.333%;
    }

    .task-con {
      margin-left: 1vh;
      font-size: 2.5vh;

      .task-con-tit {
        font-size: 1.5vh;
        margin-top: 1vh;
      }
    }
  }
}
</style>
